﻿using System.Collections.ObjectModel;
using KinonekoSoftware.Expressions.Core;

namespace KinonekoSoftware.Expressions.Primitives
{
    public class XCoreList : ExpressionBlockNode
    {
        public sealed override ExpressionNode Generate()
        {
            return new XCoreList
            {
                Id             = GetID(),
                Items          = new ObservableCollection<XCoreListItem>(),
                UseOrderedList = UseOrderedList,
            };
        }
        
        /// <summary>
        /// 是否为有序列表
        /// </summary>
        public bool UseOrderedList { get; set; }

        public required ObservableCollection<XCoreListItem> Items { get; init; }
    }
}